﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ASAermod.FileLayers
{

    /// <summary>
    /// 在新版本中stage1 2 3 已经被合并了
    /// 现在起，我们使用这个类
    /// </summary>
    public class AermetInp
    {

        public AermetInp()
        {


        }


        string _fileName = "aermet.inp";

        public string FileName
        {
            get { return _fileName; }
            set { _fileName = value; }
        }




        string _REPORT = "aermet.RPT";

        public string REPORT
        {
            get { return _REPORT; }
            set { _REPORT = value; }
        }


        string _MESSAGES = "aermet.ERR";

        public string MESSAGES
        {
            get { return _MESSAGES; }
            set { _MESSAGES = value; }
        }



        #region UpperAir

        string _UPPERAIRQAOUT;

        /// <summary>
        /// 高空气象数据的输入文件名
        /// </summary>
        public string UPPERAIRQAOUT
        {
            get { return _UPPERAIRQAOUT; }
            set { _UPPERAIRQAOUT = value; }
        }


        string _SURFACEQAOUT;

        /// <summary>
        /// 地面气象数据的输入名
        /// </summary>
        public string SURFACEQAOUT
        {
            get { return _SURFACEQAOUT; }
            set { _SURFACEQAOUT = value; }
        }


        string _ONSITEQAOUT;

        /// <summary>
        /// 现站补充检测数据
        /// </summary>
        public string ONSITEQAOUT
        {
            get { return _ONSITEQAOUT; }
            set { _ONSITEQAOUT = value; }
        }


        string _OUTPUT = "stage1n2.MET";

        public string OUTPUT
        {
            get { return _OUTPUT; }
            set { _OUTPUT = value; }
        }


        string _XDATES;

        public string XDATES
        {
            get { return _XDATES; }
            set { _XDATES = value; }
        }



        #endregion 



        public void WriteFiles(string path)
        {
            StringBuilder sb = new StringBuilder();

            ////////////////////////
            sb.AppendLine("JOB");

            sb.AppendLine("REPORT " + this.REPORT);
            sb.AppendLine("MESSAGES " + this.MESSAGES);


            //////////////////////////

            sb.AppendLine("UPPERAIR");

            sb.AppendLine("QAOUT " + this.UPPERAIRQAOUT);




            //////////////////////////////////

            sb.AppendLine("SURFACE");

            sb.AppendLine("QAOUT " + this.SURFACEQAOUT);


            /////////////////////////////////////

            sb.AppendLine("ONSITE");

            sb.AppendLine("AQOUT " + this.ONSITEQAOUT);


            /////////////////////////////////////////

            sb.AppendLine("MERGE");

            sb.AppendLine("OUTPUT " + this.OUTPUT);

            sb.AppendLine("XDATAS " + this.XDATES);




            ////////////////////////////////////////////





        }

    }
}
